import axios from "../../index"
import qs from 'qs'

// 收支列表
export const getIncomeListAxios = (data) => {
    return axios({
        url: '/queryFinanceList',
        method: 'GET',
        params: data
    })
}

// 今日收支
export const getTodayIncomeAxios = (data) => {
    return axios({
        url: '/queryTodayFinanceList',
        method: 'GET',
        params: data
    })
}

// 本周收支
export const getWeekIncomeAxios = (data) => {
    return axios({
        url: '/queryWeekFinanceList',
        method: 'GET',
        params: data
    })
}

// 本月收支
export const getMonthIncomeAxios = (data) => {
    return axios({
        url: '/queryMonthFinanceList',
        method: 'GET',
        params: data
    })
}

// 收支新增界面
export const getAddInOutcomeAxios = (currentPage) => {
    return axios({
        url: '/queryAddFinance',
        method: 'GET',
        params: {
            rae_Type_No: currentPage, // 当前点击的页面
        }
    })
}

// 审核状态修改接口
export const setStateAxios = (params) => {
    return axios({
        url: '/updateStateFinance',
        headers: { 'content-type': 'application/x-www-form-urlencoded' },
        method: 'POST',
        data: qs.stringify(params)
    })
}

// 新增收支接口
export const addInoutComeAxios = (params) => {
  console.log("参数：", params);
  return axios({
    url: '/addFinance',
    method: 'POST',
    data:params
  })
}

// 查询客户信息
export const addCustomerDataAxios = (params) => {
    return axios({
        url: '/customer/getPage',
        method: 'POST',
        data: params
    })
}

// 删除客户信息
export const getCustomerDataAxios = (currentPage) => {
    return axios({
        url: '/updateDeleteFinance',
        method: 'GET',
        params: {
            finance_No: currentPage, // 当前点击的页面
        }
    })
}

// 修改财务信息接口
export const addIMoneyDataAxios = (params) => {
    console.log("参数：", params);
    return axios({
      url: '/updateFinance',
      method: 'POST',
      data:params
    })
  }

//  普通搜索接口
export const getSearchDataAxios = (data) => {
    return axios({
        url: '/querySearchFinance',
        method: 'GET',
        params: data
    })
}